import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;

public class BufferedReaderTest02 {
    public static void main(String[] args) throws  Exception{
        //创建了一个字节流。但是BufferedReader的参数部分只能传入字符输入流。
        FileInputStream inputStream = new FileInputStream("C:\\Users\\30539\\Desktop\\text.txt");
        //将字节流转换成字符流
        //此时的inputStream是节点流，inputStreamReader是包装流
        InputStreamReader inputStreamReader = new InputStreamReader(inputStream);

        BufferedReader bufferedReader = null;
        //此时inputStreamReader是节点流 bufferedReader是包装流
        //所以只需要关闭最外层的bufferedReader就可以了
        bufferedReader = new BufferedReader(inputStreamReader);
    }
}
